<?php
namespace api\controllers;

use yii\rest\ActiveController;


class SiteController extends ActiveController
{
    public $modelClass = 'backend\models\User';

    public function behaviors()
    {
        $behaviors = parent::behaviors();
        unset($behaviors['contentNegotiator']['formats']['application/xml']);//去除xml格式就按剩下的json显示
        return $behaviors;
    }

}
